﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.Security;
using System.IdentityModel.Selectors;
using LevenBlog.Core.Utils;

namespace LevenBlog.Core.WcfService {
    public class ServiceNamePasswordValidator : UserNamePasswordValidator {
        public override void Validate(string userName, string password) {
            if (userName != WebConfig.ServiceUserName || password != WebConfig.ServicePassword) {
                throw new SecurityNegotiationException("Service username or password error.");
            }
        }
    }
}
